#ifndef __D9AC9A71_4DC6_442a_8551_8D81E04D259E__
#define __D9AC9A71_4DC6_442a_8551_8D81E04D259E__

#include "../handle/head.h"

/////////////////////////////////////////////////////////////////////////////////////////
// 
namespace xos
{
    // 
    // select interface
    // 
    class i_select
    {
    public:
        // 
        // event wait type.
        // 
        enum enumWaitRet
        {
            // 
            // wait ret. 
            // 
            EVENT_WAIT_OBJECT_0,

            // 
            // wait timeout
            // 
            EVENT_WAIT_TIMEOUT,

            // 
            // wait failed
            // 
            EVENT_WAIT_FAILED,

            // 
            // wait for ever ...
            // 
            EVENT_WAIT_INFINITE = 0xffffffff
        };

    public:
        virtual ~i_select(){}

    public:
        // 
        // select function. the same as os select.
        // 
        virtual int select( i_handle * pRead[], int & nReadNum, 
            i_handle * pWrite[], int & nWriteNum, 
            i_handle * pError[], int & nErrorNum, 
            xos::xos_u32 uTimeout ) = 0;

        // 
        // release
        // 
        virtual int release() = 0;
    };
}

#endif // __D9AC9A71_4DC6_442a_8551_8D81E04D259E__
